#ifndef TREND_H
#define TREND_H

/*
 *	trend.h
 *	Stores two arrays which maintain the highest and
 *	lowest five trending words.
 */

typedef struct _trend_elmt {
	int delta_freq;
	char *key;
} * TrendingElement;

typedef struct _trend_list {
	TrendingElement down_list[5];
	TrendingElement up_list[5];
	TrendingElement max_down;
	TrendingElement min_up;
	int down_count;
	int up_count;
} * TrendingList;

/* Initialize a TrendingList */
TrendingList trend_init (void);

/* Deinitialize a TrendingList */
void trend_free (TrendingList *);

/* Attempt an insert into the list */
void trend_insert (TrendingList, int, char *);

/* Test function to print both trending lists */
void trend_print_lists (TrendingList);

#endif
